#ifndef CS488_MATERIAL_HPP
#define CS488_MATERIAL_HPP

#include "algebra.hpp"
#include "image.hpp"

class Material {
public:
  virtual ~Material();
  virtual void apply_gl() const = 0;
virtual Colour get_diffuse() const = 0;
virtual Colour get_specular() const = 0;
virtual double get_shininess() const = 0;
virtual double get_reflection() const = 0;
virtual double get_refraction() const = 0;
protected:
  Material()
  {
  }
};

class PhongMaterial : public Material {
public:
  PhongMaterial(const Colour& kd, const Colour& ks, double shininess, 
				double reflection = 0.0, double refraction = 0.0);
  virtual ~PhongMaterial();

  virtual void apply_gl() const;
virtual Colour get_diffuse() const;
virtual Colour get_specular() const;
virtual double get_shininess() const;
virtual double get_reflection() const;
virtual double get_refraction() const;
private:
  Colour m_kd;
  Colour m_ks;
  double m_shininess;
double m_reflection;
double m_refraction;
};

class Texture {
public:
	Texture(const std::string& filename);
	~Texture();
	Colour extract_colour(double u, double v);
private:
	Image m_image;
};

class Bump {
public:
	Bump(const std::string& filename);
	~Bump();
	Vector3D extract_normal(double u, double v);
private:
	Image m_image;
};

#endif
